package com.xnf.ssmweb.service.impl;

import com.xnf.ssmweb.dao.PermissionMapper;
import com.xnf.ssmweb.domain.Permission;
import com.xnf.ssmweb.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chendx on 2021/3/30.
 */
@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    public List<Permission> queryPermissions() {
        return permissionMapper.findAll();
    }

    public Permission queryPermissionById(Long id) {
        return permissionMapper.findById(id);
    }

    public void savePermission(Permission permission) {
        permissionMapper.save(permission);
    }
}
